<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<link rel="stylesheet" href="http://localhost/obj/movier/ldf/vmovier/Admin/Tpl/Public/css/inc.css" />
	<link rel="stylesheet" href="http://localhost/obj/movier/ldf/vmovier/Admin/Tpl/Public/css/ico.css" />
	<!--[if IE 7]>
		<link rel="stylesheet" href="http://localhost/obj/movier/ldf/vmovier/Admin/Tpl/Public/css/ico-ie7.css">
	<![endif]-->
	<script type='text/javascript' src='http://localhost/obj/movier/HDPHP/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>

	<script type="text/javascript" src='http://localhost/obj/movier/ldf/vmovier/Admin/Tpl/Public/js/extend.js'></script>
	<script type="text/javascript" src='http://localhost/obj/movier/ldf/vmovier/Admin/Tpl/Category/js/js.js'></script>

	<title>修改栏目</title>
</head>
<body class="bgwhite-1">
	<div class="Menu">
		<a href="<?php echo U('index');?>"><i class="icon-reorder mr3 gray"></i>栏目管理</a>
		<a href="<?php echo U('add');?>"><i class="icon-plus mr3 gray"></i>添加栏目</a>
		<a href="<?php echo U('updateCache');?>" class="ajax" actUrl="<?php echo U('index');?>"><i class="icon-refresh mr3 gray"></i>更新缓存</a>
		<a class="act"><i class="icon-edit"></i>修改栏目</a>
	</div>
<form action="<?php echo U('edit');?>" method="post" enctype="multipart/form-data">
	<input type="hidden" name='cid' value='<?php echo $field['cid'];?>' />
	<div class="p10">
		<table class="table form">
			<tr class='fm f14'>
				<td class="tr f14 fm pct25"><span class="pr10">所属栏目</span></td>
				<td>
					<select name="pid" class="selected">
						<option value="0">顶级栏目</option>
						<?php $hd["list"]["cate"]["total"]=0;if(isset($category) && !empty($category)):$_id_cate=0;$_index_cate=0;$lastcate=min(1000,count($category));
$hd["list"]["cate"]["first"]=true;
$hd["list"]["cate"]["last"]=false;
$_total_cate=ceil($lastcate/1);$hd["list"]["cate"]["total"]=$_total_cate;
$_data_cate = array_slice($category,0,$lastcate);
if(count($_data_cate)==0):echo "";
else:
foreach($_data_cate as $key=>$cate):
if(($_id_cate)%1==0):$_id_cate++;else:$_id_cate++;continue;endif;
$hd["list"]["cate"]["index"]=++$_index_cate;
if($_index_cate>=$_total_cate):$hd["list"]["cate"]["last"]=true;endif;?>

							<option value="<?php echo $cate['cid'];?>" <?php echo $cate['disabled'];?> <?php echo $cate['selected'];?>><?php echo $cate['_name'];?></option>
						<?php $hd["list"]["cate"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
					</select>
				</td>
			</tr>
			<tr class='fm f14'>
				<td class="tr f14 fm pct25"><span class="pr10">栏目标题</span></td>
				<td><input class="pct30" type="text" name="cname" value="<?php echo $field['cname'];?>"  /></td>
			</tr>
			<tr class='fm f14'>
				<td class="tr f14 fm pct25"><span class="pr10">跳转地址</span></td>
				<td><input class="pct40" type="text" name="url" placeholder="控制器名称/方法 如：Index/index" value="<?php echo $field['url'];?>"  /></td>
			</tr>
			<tr class='fm f14'>
				<td class="tr f14 fm pct25"><span class="pr10">栏目图片</span></td>
				<td>
					<fieldset class="bgwhite pct50 dib">
						<legend>上传图片</legend>
						<input type="file"  name="pic" />

					</fieldset>
					<?php if($field['pic']){?>
						<div class="dib bde showPic">
						<img src="http://localhost/obj/movier/<?php echo $field['pic'];?>" style="vertical-align:middle" height="30" />
						<input type="hidden" name="oldpic" value="<?php echo $field['pic'];?>" />
						</div>
					<?php }?>
				</td>
			</tr>
			<tr class='fm f14'>
				<td class="tr f14 fm pct25"><span class="pr10">栏目关键字(SEO)</span></td>
				<td><textarea class="pct60" name="keywords" cols="30" rows="2"><?php echo $field['keywords'];?></textarea></td>
			</tr>
			<tr class='fm f14'>
				<td class="tr f14 fm pct25"><span class="pr10">栏目描述(SEO)</span></td>
				<td><textarea class="pct70" name="description" cols="30" rows="3"><?php echo $field['description'];?></textarea> <span class="gray">80-120字为宜</span></td>
			</tr>
		</table>
	</div>
	<div class="fixBottom">
		<p class="p5 tc"><input type="submit" class="btn bgblack f20" value='确定操作' /></p>
	</div>
</form>
</body>
</html>